package com.cs.common.result;

import com.fasterxml.jackson.annotation.JsonFormat;

@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ResultCode {
    SHOPCAR_ADD_SUCCESS(20001,"购物车添加商品成功"),
    ORDER_ADD_SUCCESS(20002,"订单提交成功"),
    ORDER_PAY_SUCCESS(20003,"支付成功"),
    USER_ORDER_SHOW(20004,"展示订单成功"),
    USER_ORDER_DEL(20005,"删除订单成功"),
    STORE_SHOW(20006,"展示门店成功"),
    GOODS_TYPE_SHOW(20007,"展示商品类型成功"),
    STORE_GOODS_SHOW(20008,"展示商品成功"),
    USER_LOGIN_SUCCESS(20009,"用户登录成功"),
    USER_QUERY_SUCCESS(20010,"人员全查询成功"),
    USER_REGISTER_SUCCESS(20011,"用户注册成功"),
    EMAIL_SEND_SUCCESS(20012,"邮件发送成功"),
    USER_QUERY_ID_SUCCESS(20013,"通过ID查询成功"),
    USER_DELETE_SUCCESS(20014,"删除用户成功"),
    USER_UPDATE_ID_SUCCESS(20015,"通过ID修改用户成功"),
    GOODS_QUERY_SUCCESS(20016,"商品查询成功"),
    SHOP_CAR_DEL_SUCCESS(20017,"商品已移除"),
    OVERTIME_SUCCESS(20018,"获取过期时间成功"),
    USER_LOGOUT_SUCCESS(20019,"用户登出成功"),

    USER_NOT_LOGIN_ERROR(50001,"用户没有登录异常"),
    USER_LOGIN_TOKEN_EXPIRED_ERROR(50002,"token已过期异常"),
    USER_PRIVILEGES_ERROR(50003,"权限异常"),
    USER_REGISTER_ERROR(50004,"用户注册失败"),
    CODE_INPUT_NULL(50005,"验证码为空"),
    CODE_INPUT_ERROR(50006,"验证码输入错误"),
    CODE_exist_NO(50007,"验证码不存在"),
    GOODS_QUERY_ERROR(50008,"商品查询失败"),
    ORDER_ADD_ERROR(50009,"购物车未添加商品"),
    ORDER_PAY_ERROR(50010,"订单已过期，支付失败"),
    USER_USERNAME_EXIST(50011,"用户名已存在，请重新输入"),
    USER_LOGIN_ERROR(50012,"账号或密错误:请重新输入"),
    CAR_SHOW_SUCCESS(50011,"购物车查看成功"),
    SHOPCAR_ADD_ERROR(50012,"商品数为0，无法添加"),
    USER_ORDER_CANCEL(20122,"取消订单成功"),
    USER_REGISTE_ERROE(50013,"用户名或密码为空，请重新输入")
    ;

    private int code;
    private String msg;

    ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }


}